function [pi] = profit_normalCosts(pi_g,pi_b,m,mu,p_g,p_b,lambda)
   
    
    %this function gives state-dep participation probabilities and wants to
    %know the associated cost. 
    
    
    
    % normcdf
    
    gamma = - (mu * (pi_g + m)) / ((1-mu)*(pi_b+m));
    
    sigma1 = (norminv(1 - p_g) + norminv(1-p_b))*(-1/(2*log(gamma)));
    sigma2 = 1/(norminv(1 - p_b) - norminv(1 - p_g));
    
    if gamma <1
        sigma = min(sigma1,sigma2);
    else
        sigma = sigma2;
    end
    
    c = @(x) 1/x^2;
    
    pi=-(mu*p_g*(pi_g+m)+(1-mu)*p_b*(pi_b+m)-lambda*c(sigma));
    